﻿using System.Collections.Generic;


namespace RStudio.Elevator
{
    /// <summary>
    /// 数据|电梯楼层方案
    /// </summary>
    public class PlanElevator
    {
        /// <summary>
        /// 唯一标识识别符
        /// </summary>
        public string Name { get; set; } 

        /// <summary>
        /// 楼层数据
        /// </summary>
        public List<DataFloor> FloorDatas { get; set; }


        public PlanElevator(string name)
        {
            this.Name = name;
            this.FloorDatas = new List<DataFloor>();
        }



        /// <summary>
        /// 
        /// </summary>
        /// <param name="floorNo"></param>
        /// <returns>
        /// 
        /// </returns>
        public DataFloor Get(int floorNo)
        {
            return this.FloorDatas.Find(e => e.FloorNo == floorNo);     
        }
    }
}
